package aerolinea

abstract class Categoria {
	@Property double precio
	@Property String nombre
	abstract def double calcularPrecio()
	protected new(){}
	new(double pr){
		precio = pr
	}
}

class Business extends Categoria{
	protected new(){}
	new (double pr){
		super(pr)
		nombre= "Business"
	}
	
	override def calcularPrecio() {
		(precio*350)/100 
	}
}

class Primera extends Categoria{
	protected new(){}
	new (double pr){
		super(pr)
		nombre= "Primera"
	}
	override def calcularPrecio() {
		(precio*500)/100
	}		
}

class Turista extends Categoria{
	protected new(){}
	new (double pr){
		super(pr)
		nombre= "Turista"
	}
	override def calcularPrecio() {
		(precio*200)/100
	}
}